package cn.iocoder.an.module.business.dal.mysql.equipmentkeepsettingtype;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.equipmentkeepsettingtype.EquipmentKeepSettingTypeDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.equipmentkeepsettingtype.vo.*;
import org.springframework.stereotype.Repository;

/**
 * 保养类型 Mapper
 *
 * @author zzy
 */
@Mapper
@Repository("EquipmentKeepSettingTypeMapper")
public interface EquipmentKeepSettingTypeMapper extends BaseMapperX<EquipmentKeepSettingTypeDO> {

    default PageResult<EquipmentKeepSettingTypeDO> selectPage(EquipmentKeepSettingTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<EquipmentKeepSettingTypeDO>()
                .likeIfPresent(EquipmentKeepSettingTypeDO::getName, reqVO.getName())
                .eqIfPresent(EquipmentKeepSettingTypeDO::getStatus, reqVO.getStatus())
                .orderByDesc(EquipmentKeepSettingTypeDO::getId));
    }

}